package org.q.threads;

import org.q.StartMain;

public class MainThread2 extends Thread {

	@Override
	public void run() {
		while(true) {
			if(StartMain.SHUTDOWN) {
				System.out.println("监听到线程结束信号， 跳出死循环");
				break;
			}
			try {
				new SubThreadWithExecption().process();
				System.out.println("MainThread2线程开始休眠..." + Thread.currentThread().getName());
				Thread.sleep(15000);
			} catch (InterruptedException e) {
				e.printStackTrace();
				System.out.println(Thread.currentThread().getName() + "结束休眠...");
			}
		}
	}
	
}
